Multiprotocol Label Switching (MPLS) is a mechanism in high-performance telecommunications networks that directs data from one network node to the next based on short path labels rather than long network addresses, avoiding complex lookups in a routing table. The labels identify virtual links (e.g., paths) between distant nodes rather than endpoints. MPLS can encapsulate packets of various network protocols. A network protocol is a system of digital message formats and rules for exchanging those messages in or between computing systems and in telecommunications. A protocol may have a formal description. Protocols may include signaling, authentication and error detection and correction capabilities.
MPLS networks have an implied hierarchy based on label stacking. Label stacking is the encapsulation of an MPLS packet inside another MPLS packet. A result of stacking is the ability to tunnel one MPLS label-switched path (LSP) inside another LSP, MPLS with Traffic Engineering (TE) and/or other MPLS features. In MPLS networking, a label-switched path (LSP) is a path through an MPLS network, set up by a signaling protocol. The path is set up based on criteria in the forwarding equivalence class (FEC).
The path begins at a label edge router (LER), which makes a decision on which label to prefix to a packet based on the appropriate FEC. It then forwards the packet along to the next router in the path, which swaps the packet's outer label for another label, and forwards it to the next router. The last router in the path removes the label from the packet and forwards the packet based on the header of its next layer, for example IPv4. Due to the forwarding of packets through an LSP being opaque to higher network layers, an LSP is also sometimes referred to as an MPLS tunnel.
Unfortunately, there is not a general purpose mechanism in network stacks (e.g., software implementations of network protocols) for labeling traffic. MPLS uses labels to route or certify packets. However, an MPLS enabled node (e.g., switch) only looks at the top label, in front of the packet, for the MPLS label. Further, MPLS headers are rigid in the sense that a network programmer is limited in the way in which an MPLS header can be used to handle traffic.